﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Inventor.Master" AutoEventWireup="true" CodeBehind="  .cs" Inherits="HospitalSystem.BenefitAdminCost" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
 <div id="sidebar">
					<ul>
						<li>
							<h2>ลงทะเบียนเด็ก</h2>
							<ul>
							
							
										<li><a href="Finance.aspx">หน้าหลักการเงิน</a></li>
									<li><a href="BenefitAdminCost.aspx">แก้ไขราคาของ</a></li>
                                        	<li><a href="Report.aspx">ดูรายงานเด็ก</a></li>
							
							</ul>
						</li>
					</ul>
				</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
 s
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
     <ContentTemplate>
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        DataKeyNames="MaterialCode" DataSourceID="SqlDataSource1">
        <Columns>
           
                     <asp:BoundField DataField="MaterialCode" HeaderText="MaterialCode" 
                ReadOnly="True" SortExpression="MaterialCode" />
            <asp:BoundField DataField="MaterialDesc" HeaderText="MaterialDesc" 
                SortExpression="MaterialDesc" />
            <asp:BoundField DataField="cost" HeaderText="cost" SortExpression="cost" />
            <asp:CommandField ShowEditButton="True" />
            <asp:CommandField ShowDeleteButton="True" />
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:sjsniper_db09ConnectionString %>" 
        
        SelectCommand="SELECT [MaterialCode], [MaterialDesc], [cost] FROM [Material]" 
        ConflictDetection="CompareAllValues" 
        DeleteCommand="DELETE FROM [Material] WHERE [MaterialCode] = @original_MaterialCode AND (([MaterialDesc] = @original_MaterialDesc) OR ([MaterialDesc] IS NULL AND @original_MaterialDesc IS NULL)) AND (([cost] = @original_cost) OR ([cost] IS NULL AND @original_cost IS NULL))" 
        InsertCommand="INSERT INTO [Material] ([MaterialCode], [MaterialDesc], [cost]) VALUES (@MaterialCode, @MaterialDesc, @cost)" 
        OldValuesParameterFormatString="original_{0}" 
        UpdateCommand="UPDATE [Material] SET [MaterialDesc] = @MaterialDesc, [cost] = @cost WHERE [MaterialCode] = @original_MaterialCode AND (([MaterialDesc] = @original_MaterialDesc) OR ([MaterialDesc] IS NULL AND @original_MaterialDesc IS NULL)) AND (([cost] = @original_cost) OR ([cost] IS NULL AND @original_cost IS NULL))">
        <DeleteParameters>
            <asp:Parameter Name="original_MaterialCode" Type="String" />
            <asp:Parameter Name="original_MaterialDesc" Type="String" />
            <asp:Parameter Name="original_cost" Type="Int32" />
        </DeleteParameters>
        <InsertParameters>
            <asp:Parameter Name="MaterialCode" Type="String" />
            <asp:Parameter Name="MaterialDesc" Type="String" />
            <asp:Parameter Name="cost" Type="Int32" />
        </InsertParameters>
        <UpdateParameters>
            <asp:Parameter Name="MaterialDesc" Type="String" />
            <asp:Parameter Name="cost" Type="Int32" />
            <asp:Parameter Name="original_MaterialCode" Type="String" />
            <asp:Parameter Name="original_MaterialDesc" Type="String" />
            <asp:Parameter Name="original_cost" Type="Int32" />
        </UpdateParameters>
    </asp:SqlDataSource>

        </ContentTemplate>
                        </asp:UpdatePanel>
</asp:Content>
